#!/bin/bash
# mysql is alive or dead

host="127.0.0.1"
user="root"
passwd="123456"

mysqladmin -h${host} -u${user} -p{passwd} ping &> /dev/null
if [ $? -eq 0 ];then
	echo "mysql is UP"
else
	echo "mysql is DOWN"
fi
